package com.evil.application.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.evil.application.pojo.dto.form.enclosure.FormEnclosureDTO;
import com.evil.application.pojo.entity.ApplicationForm;
import com.evil.application.pojo.entity.ApplicationFormEnclosure;

import java.util.List;

/**
 * 应用表单附件表
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
public interface ApplicationFormEnclosureService extends IService<ApplicationFormEnclosure> {

    /**
     * 获取表单附件列表
     *
     * @param formId formId
     * @return ApplicationFormEnclosure 列表
     */
    List<ApplicationFormEnclosure> findByFormId(Long formId);

    /**
     * 获取表单附件基础信息列表
     *
     * @param formId formId
     * @return ApplicationFormEnclosure 列表
     */
    List<FormEnclosureDTO> findBaseByFormId(Long formId);

    /**
     * 保存表单附件
     *
     * @param applicationForm applicationForm
     * @param formEnclosures  formEnclosures
     */
    void modifyFormEnclosure(ApplicationForm applicationForm, List<FormEnclosureDTO> formEnclosures);

    /**
     * 删除表单编号规则
     *
     * @param formId formId
     */
    void deleteByFormId(Long formId);

    /**
     * 复制表单编号规则
     *
     * @param source 复制源表单
     * @param target 复制目标表单
     */
    void copyFormEnclosure(ApplicationForm source, ApplicationForm target);

    /**
     * 删除表单规则
     *
     * @param form form
     */
    void deleteFormEnclosure(ApplicationForm form);

}
